<!-- start sidebar -->
	<div id="sidebar">
		<ul>
			<li id="search" style="background: none;">
				<form id="searchform" method="get" action="">
					<div>
						<input type="text" name="s" id="s" size="15" />
						<br />
						<input type="submit" value="Search" />
					</div>
				</form>
			</li>
			<li id="categories">
				<h2>分类目录</h2>
				<ul>
				  %for cate in allcates:
				  <li><a href="/categories/{{cate.get('_id')}}/">{{cate.get('name')}}</a> ({{cate.get('artnum')}}) </li>
				%end
				</ul>
			</li>
			<li>
				<h2>最新文章</h2>
				<ul>
				%for topart in toptenart:
					%id = topart.get('_id')
					%title = topart.get('title')
					<li><a href="/archrives/{{id}}">{{title}}</a></li>
				%end
				</ul>
			</li>
			<li>
				<h2>文章归档</h2>
				<ul>
				%for date in dates:
				%year = date.split('-')[0]
				%month = date.split('-')[1]
					<li><a href="/archrives/date/{{year}}/{{month}}/">{{year}}年{{month}}月</a></li>
				%end
				</ul>
			</li>
            <li>
                <h2>功能</h2>
                <ul>
                    <li>
                        <a href="/login">登录</a>
                    </li>
                    <li>
                        <a href="wwww.linuxzen.com">水滴系统</a>
                    </li>
                </ul>
            </li>
		</ul>
	</div>
	<!-- end sidebar -->
